import ajax from '@/api/apiConfig.js'

/* 警情列表 */
export const getAlarmInfo = (data) => {
  return ajax.get('infodata/getFcfHistoryDatas', data)
}

/* 历史警情列表 */
export const getFcfHistoryDatas = (data) => {
  return ajax.get('infodata/getFcfHistoryDatas', data)
}

/* 警情统计 */
export const getAlarmStatusCount = (data) => {
  return ajax.get('alarm/getAlarmStatusCount', data)
}

/* 获取联网单位警情数量 */
export const getAlarmTotalCount = (data) => {
  return ajax.get('infodata/getFcfHistoryDatasCount', data)
}

/* 近一个月警情次数 */
export const getAlarmCountByFcfId = (data) => {
  return ajax.get('alarm/getAlarmCountByFcfId', data)
}

/* 时间段内发生各个类别警情统计 */
export const getAlarmGroupCount = (data) => {
  return ajax.get('alarm/getAlarmGroupCount', data)
}

/* 获取模拟量数据 */
export const getAnalogData = (data) => {
  return ajax.get('analogdata/getData', data)
}

/* 获取模拟量-new */
export const getAlarmFcfAnalogInfo = (data) => {
  return ajax.get('alarm/getAlarmFcfAnalogInfo', data)
}

/* 获取模拟量对应阈值 */
export const getThreshold = (data) => {
  return ajax.get('analogdata/getThreshold', data)
}

/* 警情处理 */
export const handleFireRecord = (data) => {
  return ajax.post('infodata/handleFireRecord', data)
}

/* 接处警处理记录 */
export const getRecordsHandleList = (data) => {
  return ajax.get('infodata/getRecordsHandleList', data)
}

/* 警情获取消防设施更多信息 */
export const getAlarmFcfMoreInfo = (data) => {
  return ajax.get('alarm/getAlarmFcfMoreInfo', data)
}

/* 获取指定消防设施指定类型的警情列表 */
export const selectRecordsInfoDetailsList = (data) => {
  return ajax.get('alarm/selectRecordsInfoDetailsList', data)
}

//警情单位TOP10
export const getOrgAlertStatistics = (data) => {
  return ajax.get('org/getOrgAlertStatistics?', data)
}

//获取警情关闭记录
export const getPoliceCloseRecords = (data) => {
  return ajax.get('policeClose/getPoliceCloseRecords', data)
}

//提前结束警情关闭提醒
export const endPoliceClose = (data) => {
  return ajax.post('policeClose/endPoliceClose', data)
}

//获取相关角色
export const getUnitRoles = (data) => {
  return ajax.get('policeClose/getUnitRoles', data)
}

//新增或编辑警情关闭记录
export const saveOrUpdatePoliceCloseRecord = (data) => {
  return ajax.post('policeClose/saveOrUpdatePoliceCloseRecord', data)
}

//获取警情常用处理类型
export const getTopAlarmHandlerType = (data) => {
  return ajax.get('alarm/getTopAlarmHandlerType', data)
}

//导出警情列表
export const exportFcfHistoryDatas = (data) => {
  return ajax.get('infodata/exportFcfHistoryDatas', data)
}